The present invention relates to a new process for preparing N,N,6-trimethyl-2-(4-methylphenyl)-imidazo-[1,2-a]-pyridine-3-acetamide and its salts.
N,N,6-trimethyl-2-(4-methylphenyl)-imidazo-[1,2-a]-pyridine-3-acetamide is a substance presenting clinical activity as hypnotic [P. George et al.xe2x80x94Actual.Chim.Thxc3xa9r. 18, 215 (1990), P. George et al.xe2x80x94Imidazopyridines in Sleep Disordersxe2x80x94De. J. P. Sauvanet, S. Z. Langer and P. L. Mosellixe2x80x94Raven Press New York, 1988, p.11], characterized by not belonging to the group of benzodiazepines, which up to now has been the basis of most drugs in use with said activity.
This substance has structural formula (I) 
There are processes for obtaining N,N,6-trimethyl-2-(4-methylphenyl)-imidazo-[1,2-a]-pyridine-3-acetamide of formula (I) [European Patents 50563 and 251589 and French Patent 2600650] where this substance is prepared by reacting imidazo-[1,2-a]-pyridine (II) and an acetal of N,N-dimethyi-glyoxamides (formula III) 
where R represents an alkyl group that yields hydroxyamide of formula (IV), without going through the ester as an intermediate product. 
The process representing the object of the present application for obtaining the substance with the structure (I), consists of reacting 2-amino-5-methyl pyridine of formula (V) with 4-methyl-haloacetophenone of formula (VI), in order to yield 6-methyl-2-(4-methylphenyl)-imidazo-[1,2-a]-pyridine of formula (II). 
The first step of the reaction for obtaining (VI) from an acid halide of formula (VII), where X is Cl or Br, is carried out in toluene by adding a Lewis acid as catalyst, such as aluminum chloride or ferric chloride.
The temperature must be below 10xc2x0 C.
The second step is performed in an alkali medium by adding a base such as sodium bicarbonate or potassium bicarbonate to the above solvent, to which an alcohol of one to three carbons is added.
The work temperature is between 40 and 70xc2x0 C.
The 6-methyl-2-(4-methylphenyl)imidazo-[1,2-a]-pyridine (II) is reacted with methyl glyoxalate of formula (VIII) or its methyl hemiacetal (IX) to yield the hydroxy ester of formula (X), described for the first time in the invention. 
This reaction is carried out using as solvent a halogenated hydrocarbon such as dichloromethane, chloroform, 1,2-dichloroethane or trichloroethylene at a temperature of 40 to 70xc2x0 C.
Removal of the hydroxyi group is performed by substitution with a chlorine through the reaction with the iminium salt generated with thionyl chloride and dimethylformamide. The halogenated compound (XI) being formed is not isolated and it is reduced to yield the ester (XII). 
Note that the intermediate compounds (X), (XI), and (XII) obtained in the process of the invention for obtaining the compound (I) are new and have not been previously described in the literature.
In order to obtain (XI) a halocarbonated solvent such as dichloromethane, chloroform, or 1,2-dichloroethane is used at a reaction temperature of 0 to 30xc2x0 C.
The reaction of (XI) to yield (XII) is carried out in the above solvent by adding a reducing substance, such as sodium hydrosulfite or sodium sulfoxylate formaldehyde.
The reaction temperature must be between 10 and 50xc2x0 C.
The reaction of (XII) with dimethylamine in a polyhydroxylated solvent such as ethylene glycol or propylene glycol yields the amide (I).
The amide of formula (I), through dissolution in an alcohol such as methanol, ethanol, or isopropanol and addition of a solution of an acid such as tartaric acid, oxalic acid, or acetic acid in the same solvent, yields the corresponding salts. The molar ratio of added acid to the amide is from 0.4:1 to 1:1.
In the preparations described in the present invention, the use of the methyl ester of the glyoxylic acid (VIII) or its methyl hemiacetal (IX) has advantages over the substance (III), which is used in said patents, since these substances are more readily available and economical.
The present process also avoids the use of dangerous solvents, such as the isopropyl ether, as well as the isolation of the chlorinated compound (XI), which simplifies the process and removes a reaction step.
Another important difference of the present invention is the use of the chloro iminium salt (XIII) as a reagent for obtaining the chloro ester (XI). 
This reagent can be used in milder, and therefore more selective, conditions, which is reflected in the throughput and particularly in the purity of the obtained products. The amide (I) is obtained as colourless crystals, with a 73% yield for the transformation of the hydroxy ester (X) into the ester (XII).
The sodium sulfoxylate used for reducing the chlorinated intermediate (XI) is a simpler and more economical reagent to use than the sodium borohydride.
The following non-limitative examples include detailed processes representing the operating possibilities of the present invention.